package cc.wsyw126.java.nowcoder;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * Created by Administrator on 2017/4/12.
 */
public class TheSmallestRectangle {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String s = scanner.nextLine();
            int n = Integer.parseInt(s);
            ArrayList<Integer> x = new ArrayList<>();
            ArrayList<Integer> y = new ArrayList<>();
            int xH = Integer.MIN_VALUE, xL = Integer.MAX_VALUE, yH = Integer.MIN_VALUE, yL = Integer.MAX_VALUE;
            while (n-- > 0) {
                String s1 = scanner.nextLine();
                String[] split = s1.split(" ");
                if (Integer.parseInt(split[0]) > xH) {
                    xH = Integer.parseInt(split[0]);
                }
                if (Integer.parseInt(split[0]) < xL) {
                    xL = Integer.parseInt(split[0]);
                }

                if (Integer.parseInt(split[1]) > yH) {
                    yH = Integer.parseInt(split[1]);
                }
                if (Integer.parseInt(split[1]) < yL) {
                    yL = Integer.parseInt(split[1]);
                }
            }
            int i = (xH - xL) * (yH - yL);
            System.out.println(i);
        }
    }
}
